seterrorhandler(print)
UIErrorsFrame:Show()

schemes = {}

function getActiveSchemeIdx()
	local _,_,classid = UnitClass('player')
	return classid * 10 + GetSpecialization()
end

local _lastTime = 0
local function onUpdate()
	if UnitIsDeadOrGhost("player") then
		return
	end

	local now = GetTime()
	if now - _lastTime < 0.1 then
		return
	end

	_lastTime = now

	local schme = schemes[getActiveSchemeIdx()]
	if schme then
		scheme.single()
	end
end

local function createF()
	F=F or CreateFrame("frame")
	F:SetScript("OnUpdate",onUpdate)
end


print('getActiveSchemeIdx() == ', getActiveSchemeIdx())


createF()
